<include file="Public:header" title="阅读 - 教辅" keyword="" />
<script>
var aid=<{$book.id}>;
</script>
<div class="pageTitle">
    <div class="container">
        <h2>
            教辅
        </h2>
		<volist name="groups" id="vo">
        <span>
            <a href="/b/g/<{$vo.id}>" <?php if($book['gpid'] == $vo['id']) echo ' class="current"';?>>
                <{$vo.cname}>
            </a>
        </span>
		</volist>
    </div>
</div>
<div class="pageContent container">
    <div class="bvtTitle">
        <h2>
            <{$book.title}>
        </h2>
        <span>
            <{$book.gdname}>&nbsp;&nbsp;-&nbsp;&nbsp;<{$book.sname}>&nbsp;&nbsp;-&nbsp;&nbsp;<{$book.cname}>
        </span>
    </div>
    <div class="bvtBox clearfix">
        <div class="leftBar fl">
            <div class="readBook">
			<{$book.content}>
            </div>
            <div class="nextBook">
                <p>上一本：<a href="__URL__/r/<{$preBook.id}>">《<{$preBook.title}>》</a></p>
                <p>下一本：<a href="__URL__/r/<{$nextBook.id}>">《<{$nextBook.title}>》</a></p>
            </div>
            <div class="comment" id="comment">
                <div class="moods">
                    <ul class="bookComment">
						<?php if(count($comments)): ?>
						<volist name="comments" id="vo">
							<li>
								<div class="userInfo fl">
									<a href="__APP__/i/<{$vo.user.id}>"><img src="<{$vo.avatar|parseAvatar=###,100}>"></a>
									<span><a href="__APP__/i/<{$vo.user.id}>"><{$vo.username}></a></span>
								</div>
								<div class="bubbleTriangle fl">
								</div>
								<div class="moodContent box fl">
									<p><{$vo.comment}></p>
									<span class="fl"><{$vo.ctime|date="Y-m-d H:i:s",###}></span>
									<span class="fr" cid="<{$vo.id}>">
									<a href="javascript:;" applaud><?php 
									$applauded = false;
									foreach($applauds[$vo['id']] as $applaud){
										if($applaud['uid']==$_SESSION['uid']){
											$applauded = true;
											break;
										}
									}
									echo $applauded?'已赞':'赞';
									if(count($applauds[$vo['id']])) echo '('.count($applauds[$vo['id']]).')';
									?></a>&nbsp;
									<a href="javascript:;" level1Comment>评论</a>
									<?php if($vo['uid'] == $_SESSION['uid']) echo '&nbsp;<a href="javascript:;" deleteComment>删除</a>'; ?>
									</span>
									<?php if($vo['comments']): ?>
										<ul class="moodComment clearfix">
											<volist name="vo['comments']" id="sub">
													<li>
														<div class="commentUser fl">
															 <a href="#">
															<img src="<{$sub.avatar|parseAvatar=###,50}>" />
															</a>
														</div>
														<div class="commemtCont fl">
															<div class="name">
																<a href="__APP__/i/<{$sub.uid}>" style="color:#000;"><{$sub.username}></a>
															</div>
															<div class="cont">
																<{$sub.comment}>
															</div>
															<div class="do">
																<span class="fl"><{$sub.ctime|date="Y-m-d H:i:s",###}></span>
																<span class="fr" cid="<{$sub.id}>">
																	<a href="javascript:;" applaud><?php 
																	$applauded = false;
																	foreach($applauds[$sub['id']] as $applaud){
																		if($applaud['uid']==$_SESSION['uid']){
																			$applauded = true;
																			break;
																		}
																	}
																	echo $applauded?'已赞':'赞';
																	if(count($applauds[$sub['id']])) echo '('.count($applauds[$sub['id']]).')';
																	?></a>&nbsp;
																	<a href="javascript:;" level2Comment>回复</a>
																	<?php if($sub['uid'] == $_SESSION['uid']) echo '&nbsp;<a href="javascript:;" deleteComment>删除</a>'; ?>
																</span>
															</div>
														</div>
													</li>
											</volist>
										</ul>
									<?php endif; ?>
								</div>
							</li>
						</volist>
						<?php else: ?>
						<div style="height: 20px;width: 100%;padding: 50px 0;text-align: center;font-weight: bold;">趁着还木有人评论，赶快抢个沙发~</div>
						<?php endif; ?>
                    </ul>
                </div>
				<div class="tip" id="sendTip" style="margin:9px 0px -12px 121px;width:604px;padding: 4px 0 0 0;">评论提示</div>
                <div class="comForm">
                    <div class="userInfo fl">
                        <div><a href="__APP__/i/<{$userInfo.id}>"><img src="<{$userInfo.avatar.100}>" /></a></div>
                        <span><a href="__APP__/i/<{$userInfo.id}>"><{$userInfo.username}></a></span>
                        <p>发表过 <a href="__APP__/i/comment">8</a> 条评论</p>
                    </div>
					
                    <div class="tips">
                        看完后你有什么想法？快和小伙伴们分享一下~&nbsp;&nbsp;&nbsp;&nbsp;( Ctrl + Enter 发送 )
                    </div>
                    <div class="bubbleTriangle fl">
                    </div>
                    <div class="comContent box fl">
                        <form method="post" onkeydown="if(event.keyCode==13&&event.ctrlKey) post_form('__APP__/a/addComment',this,'sendTip');">
							<input type="hidden" name="aid" value="<{$articleId}>">
                            <textarea name="comment" placeholder="在此输入评论..." maxlength="300"></textarea>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div class="rightBar fl">
            <div class="bvtInfo">
                <div class="marks">
                    <span>
                        7.9
                    </span>
                    <p>
                        分&nbsp;&nbsp;&nbsp;17人评分
                        <br />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;我的评分
                        <img src="__PUBLIC__/static/img/marks-star.png" />
                        <img src="__PUBLIC__/static/img/marks-star.png" />
                        <img src="__PUBLIC__/static/img/marks-star.png" />
                        <img src="__PUBLIC__/static/img/marks-star-part.png" />
                        <img src="__PUBLIC__/static/img/marks-star-normal.png" />
                    </p>
                </div>
                <div class="status clearfix">
					<table class="nostyle">
						<tr>
							<td><i class="user">&nbsp;&nbsp;&nbsp;&nbsp;</i>上传者</td>
							<td><a href="__APP__/i/<{$book.user.id}>"><{$book.username}></a></td>
						</tr>
						<tr>
							<td><i class="date">&nbsp;&nbsp;&nbsp;&nbsp;</i>上传时间</td>
							<td><{$book.ctime|date="Y-m-d",###}></td>
						</tr>
						<tr>
							<td><i class="fav">&nbsp;&nbsp;&nbsp;&nbsp;</i>收藏数</td>
							<td>
							<span><{$count.fav}></span>
							<?php if($isFav): ?>
							(<a href="javascript:;" title="点此取消" articleFav>已收藏</a>)
							<?php else: ?>
							(<a href="javascript:;" title="点此收藏" articleFav>点此收藏</a>)
							<?php endif; ?>
							</td>
						</tr>
						<tr>
							<td><i class="comment">&nbsp;&nbsp;&nbsp;&nbsp;</i>评论数</td>
							<td><{$count.comment}></td>
						</tr>
						<tr>
							<td><i class="view">&nbsp;&nbsp;&nbsp;&nbsp;</i>阅读数</td>
							<td><{$count.view}></td>
						</tr>
						<tr>
							<td><i class="link">&nbsp;&nbsp;&nbsp;&nbsp;</i>外部链接</td>
							<td><a href="<{$book.link}>" target="_blank">点此前往</a></td>
						</tr>
					</table>
                </div>
                <div>
                    <h2>
                        相关书籍
                    </h2>
                    <ul class="bvtSlider" p="other">
                        <li class="current" title="点击预览书籍信息">
                            <div class="title">
                                1.
                                <a href="#">
                                    《相关书籍1》
                                </a>
                            </div>
                            <div class="desc">
                                <img src="__PUBLIC__/static/img/nocover.png" />
                                <p>
                                    这里是该书的介绍这里是该书的介绍这里是该书的介绍这里是该书的介绍这里是该书的介绍
                                </p>
                            </div>
                        </li>
                    </ul>
                </div>
                <div>
                    <h2>
                        推荐阅读
                    </h2>
                    <ul class="bvtSlider" p="recom">
                        <li class="current" title="点击预览书籍信息">
                            <div class="title">
                                1.
                                <a href="#">
                                    《推荐书籍1》
                                </a>
                            </div>
                            <div class="desc">
                                <img src="__PUBLIC__/static/img/nocover.png" />
                                <p>
                                    这里是该书的介绍这里是该书的介绍这里是该书的介绍这里是该书的介绍这里是该书的介绍
                                </p>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
<include file="Public:footer" />